#ifndef N2DRAWER_H_2009_10_09
#define N2DRAWER_H_2009_10_09

#include "N1Lib.h"
#include "N2Color.h"
#include "N2Geometry.h"
#include "N2Palette.h"
#include "N2Region.h"
#include "N2Brush.h"
#include "N2WorldTransform.h"

class N2SimpleDrawer {
public:
    virtual uint32 getPixel(uint32 x, uint32 y) const =0;
    virtual void   setPixel(uint32 x, uint32 y)=0;
    virtual void   drawVertLine(uint32 x, uint32 y1, uint32 y2)=0;
    virtual void   drawHorzLine(uint32 y, uint32 x1, uint32 x2)=0;
    virtual void   fillRect(const N2Rect &rect)=0;
};


class N2Drawer : public N2SimpleDrawer {
protected:
    N2Drawer();
public:
    virtual N2Size getSize() const =0;
    virtual uint32 getBitsPerPixel() const =0;

    virtual N2Palette* getPalette() const =0;

    virtual void             setWorldTransform(const N2WorldTransform &wt)=0;
    virtual N2WorldTransform getWorldTransform() const =0;

    virtual void     setColor(const N2Color &color)=0;
    virtual N2Color  getColor() const =0;

    virtual void     setBrush(N2Brush *brush)=0;
    virtual N2Brush* getBrush() const =0;

    virtual N2Color  getPoint(const N2Point &point) const =0;

    virtual void drawPoint(const N2Point &point)=0;
    virtual void drawLine(const N2Point &from, const N2Point &to)=0;
    virtual void drawRect(const N2Rect &rect)=0;
    virtual void drawShape(const N2Point *points, uint32 count)=0;
};

#endif //N2DRAWER_H_2009_10_09
